
<%@ page import="gdepot.Category" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'category.label', default: 'Category')}" />
		<title><g:message code="default.list.label" args="[entityName]" /></title>
	</head>
	<body>
	<div class="row">
		<div class="container">
			<ol class="breadcrumb">
				<li>Category List</li>
			</ol>
		</div>
	</div>

	<div class="row">
		<div class="container" style="margin-bottom: -10px;">

			<table width="100%" class="table">
				<tr>
					<g:form class="navbar-form navbar-left" role="search"
							url="[action: 'search', controller: 'accountBank']">

						<td width="20%">
							<g:textField name="fullName" maxlength="20" class="form-control" required="" value=""
										 placeholder="姓名" style="text-align:center"/>
						</td>
						<td width="5%">
							<g:actionSubmit action="search" class="btn btn-default btn-block" value="搜索"/>
						</td>

					</g:form>
					<td width="60%"></td>
					<td width="5%"><g:link class="btn btn-primary btn-block" controller="category" action="create">新建</span></g:link></td>
				</tr>
			</table>
		</div>
	</div>

	<div class="role">

		<div class="container">

			<g:if test="${flash.message}">
				<div class="alert alert-warning">
					<a href="#" class="close" data-dismiss="alert">
					&times;
					</a>
					<strong>${flash.message}</strong>
				</div>
			</g:if>
			<table class="table table-striped table-bordered">
				<thead>
			<thead>
					<tr>
						<g:sortableColumn property="categoryName" title="${message(code: 'category.categoryName.label', default: 'Category Name')}" />
						<th><g:message code="category.parentCategory.label" default="Parent Category" /></th>
					</tr>
				</thead>
				<tbody>
				<g:each in="${categoryInstanceList}" status="i" var="categoryInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
					
						<td><g:link action="show" id="${categoryInstance.id}">${fieldValue(bean: categoryInstance, field: "categoryName")}</g:link></td>
					
						<td>${fieldValue(bean: categoryInstance, field: "parentCategory")}</td>
					
					</tr>
				</g:each>
				</tbody>
			</table>
			<div class="pagination">
				<g:paginate total="${categoryInstanceCount ?: 0}" />
			</div>
		</div>
	</body>
</html>
